package org.mdrtwell.designpattern.specification;

public class NotSpecification<T> extends CompositeSpecification<T> {

	private ISpecification<T>	wrapped;

	public NotSpecification(ISpecification<T> wrapped) {
		super();
		this.wrapped = wrapped;
	}

	@Override
	public boolean isStatisfiedBy(T candidate) {
		return !wrapped.isStatisfiedBy(candidate);
	}

}
